<%@page import="java.io.* , java.util.*, java.sql.*, com.myapp.struts.actionform.*, com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<html >
    <head>
        <title>Delete a location</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css">
        <script language="javascript">
        function Validate()
        {
         var index3=document.deleteLoc.locationCode.selectedIndex;                        
             if(index3<=0)
             {
                 alert("Please Enter a Location Code....");                            
                 document.deleteLoc.locationCode.focus();
                 return false;
             }
		}
		</script>
    </head>
    <body>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="545" colspan="4" align="center" valign="top">&nbsp;<br />
                    &nbsp;<br />
                    <form id="deleteLoc" name="deleteLoc" action="../../../../DeleteLocation" onSubmit="return Validate();">
                        <table border="0" align="center" cellpadding="0" cellspacing="0" style="border-right: #000000 1px solid;
                               border-top: #000000 1px solid; border-left: #000000 1px solid;  border-bottom: #000000 1px solid; font-size: 9pt; color: #000000; font-family: Arial;">
                            <tr >
                                <th height="28" colspan="2" align="center" valign="middle"><strong>DELETE CODE</strong></th>
                            </tr>
                            <tr>
                                <td width="89">SITE CODE</td>
                                <td width="88">
                                    <select name="locationCode" id="locationCode" >
                                        <option> </option>
                                        <%
                                                    LocationMasterDao imdao=new LocationMasterDao();
                                                    Vector gp = imdao.getLocations();
                            if (gp != null) {
                                Iterator itg = gp.iterator();
                                while (itg.hasNext()) {
                                    LocationMasterFormBean gb = (LocationMasterFormBean) itg.next();
                                    String loc_name = gb.getLocationCode();
                                        %>
                                        <option value="<%=loc_name%>"><%=loc_name%></option>
                                        <%}

                            }%>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" align="center" valign="middle">
                                    <input name="Submit" type="submit" class="subHeader" value="Delete" /></td>
                            </tr>
                        </table>
                    </form></td>
            </tr>

            <tr>
                <td width="42">&nbsp;</td>
                <td width="203">&nbsp;</td>
                <td width="522">&nbsp;</td>
                <td width="211">&nbsp;</td>
            </tr>
        </table>
    </body>
</html>
